// import { get } from "../../../routes/test.js";
import base from "./base.js"
export default class extends base {

    // 渲染页面
    render() {
    this.el.html(`
    <div>
    <h1>同源</h1>
    <button class="but">按钮</button>
    </div>`);
        this.but = $(".but");
    }
    // 加载事件
    handle() {
        this.but.on('click', async () => {

             await $.ajax({
                type:"get",
                url: "/api/test/1",
                success: (data) => {
                    console.log(data);
                }
            })
        })

    }
}